<?php
$this->breadcrumbs=array(
	'下载',
	'管理',
);

$this->menu=array(
//	array('label'=>'List Download', 'url'=>array('index')),
//	array('label'=>'Create Download', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('download-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>下载管理</h1>


<?php echo CHtml::link('高级搜索','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'download-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
//		'id',
    array('name'=>'id', 'htmlOptions'=>array('width'=>'15px')),
//		'title',
    array('name'=>'title', 'htmlOptions'=>array('width'=>'55px')),
//		'filename',
    array('name'=>'filename', 'htmlOptions'=>array('width'=>'85px')),
		'description',
//		'file_type',
    array('name'=>'file_type', 'value'=>'$data->filetype->file_type_name','filter'=>FileType::model()->getFileTypeList(),'htmlOptions'=>array('width'=>'65px')),
//		'status_id',
    array('name'=>'status_id', 'value'=>'$data->status->status_name', 'filter'=>StatusType::model()->getStatusTypeList(), 'htmlOptions'=>array('width'=>'55px')),
		array(
			'class'=>'CButtonColumn',
			'template'=>'{update}{delete}',
		  'htmlOptions'=>array('width'=>'30px'),
			'headerHtmlOptions'=>array('width'=>'34px'),
		),
	),
)); ?>
